//Accepted
#include <cstdio>
int i, j,a,b, n, c;
void process(){
	int max=0;
	if(a<b){i=a;j=b;}
	else {i=b;j=a;}
	while(i<=j){
		n=i;
		c=1;
		while(n>1){
			if(n&1)n = (3*n + 1);
			else n/=2;
			++c;
		}
		if(c>max)max=c;
		++i;
	}
	printf("%d %d %d\n",a,b, max);
}

int main(){ 
	//freopen("in.txt","r",stdin);
	while(scanf("%d%d", &a, &b)==2)
	process();
	return 0;
}
